package com.biao.java8.method_reference;

public class Test02_instance_main {
    public static void main(String[] args) {
        /**
         * 实例方法引入
         */

        Test02_instance_main mainInstance = new Test02_instance_main();
        /*
        使用lambda方式进行方法引入
         */
        Test02_instance instanceMethodLambda = () -> mainInstance.test();
        System.out.println(instanceMethodLambda.get());

        /**
         * 方法引入写法
         */
        Test02_instance instanceMethod = mainInstance::test;
        System.out.println(instanceMethod.get());

    }

    public String test() {
        return "test...";
    }
}
